/**
 * 公共服务接口
 */
import config from "config/config";
import { visit } from 'utils/Cache'

/**
 * 前往平台微信公众号网页授权
 * @param toFullPath 用于授权完成后跳转的目标页面
 */
const weixinAuthorize = toFullPath => {
  let visitorId =	visit.getCookieId()
  sessionStorage.setItem("thirdLoginRedirect", toFullPath);
  window.location.href = config.server + "/thirdlogin/weixin/h5/authorize?visitorId="+visitorId;
};

export { weixinAuthorize };
